<template>
	<div class="demo1">
		<h1>我是Demo1组件，我有一台：{{phone}}</h1>
		<button @click="sendPhone">点我把手机给Demo2</button>
	</div>
</template>

<script>
	export default {
		name:'Demo1',
		data(){
			return {
				phone:'华为Meta40'
			}
		},
		methods:{
			sendPhone(){
				this.$bus.$emit('shouji',this.phone)
			}
		}
		// mounted(){
		// 	console.log('我是Demo1的vc',this)
		// }
	}
</script>

<style>
	.demo1{
		background-color: orange;
		padding: 10px;
	}
</style>